package com.mdxq.mall.response;

import lombok.Data;
@Data
public class R {
    private int code;
    private String message;
    private Object Data;

    private R(int code, String message, Object data) {
        this.code = code;
        this.message = message;
        Data = data;
    }

    private R(){

    }
    public static R ok(Object data){
        R r = new R(200,"操作成功",data);
        return r;
    }
    public static R error(){
        R r = new R(500,"程序出错了",null);
        return r;
    }
}
